package com.example.demo;

import org.springframework.boot.context.event.ApplicationStartingEvent;
import org.springframework.context.ApplicationListener;

/**
 * 服务开始启动监听
 * @author zy
 *
 */
//@Component
public class ApplicationStartedEventListener implements ApplicationListener<ApplicationStartingEvent> {

    @Override
    public void onApplicationEvent(ApplicationStartingEvent applicationStartedEvent) {
        System.out.println("服务正在启动 .....");
    }
}
